Skip to content

Conversation

@mayakoneval
Copy link
Contributor

What? This PR adds a new npm package @apollo/embed-helpers that contains shared code between @apollo/sandbox and @apollo/explorer.

Why? When we need to support new protocols, like @defer, multi part subscriptions, file upload, in our clients, we need to implement everything twice, in @apollo/sandbox and @apollo/explorer.

This is step one in migrating @apollo/sandbox and @apollo/explorer to share this code.

  1. make new npm package
  2. install it in @apollo/sandbox and @apollo/explorer, remove redundant code!

@changeset-bot
Copy link

changeset-bot bot commented Apr 4, 2023

⚠️ No Changeset found

Latest commit: 0d7b48d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 4, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0d7b48d:

Sandbox Source
npm-embeddable-explorer (forked) Configuration
npm-embeddable-sandbox Configuration
maya-test-embed-next Configuration
maya-test-embed-next Configuration

@Jephuff
Copy link
Contributor

Jephuff commented Apr 4, 2023

It might be nice to use some of these helpers in studio as well, so we only have 1 implementation of the defer stuff?
What do you think about splitting these into 2 helper packages explorer-helpers and embed-helpers?

Or I guess we could just use embed-helpers? I'm guessing there aren't any large deps in there 🤔

@mayakoneval
Copy link
Contributor Author

@Jephuff I like that idea! I think we could reuse constructMultipartForm and readMultipartWebStream specifically in Explorer. I'll split those out 🙇🏻

@mayakoneval mayakoneval marked this pull request as draft April 5, 2023 00:30
@mayakoneval
Copy link
Contributor Author

This needs to wait on release of #235

@Jephuff Jephuff removed request for Jephuff and cheapsteak May 3, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants